<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Headfile')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-headfile" class="form-control" size="50" name="row[headfile]" type="text" value="{$row.headfile|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-headfile" class="btn btn-danger faupload" data-input-id="c-headfile" data-multiple="false" data-preview-id="p-headfile"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-headfile" class="btn btn-primary fachoose" data-input-id="c-headfile" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-headfile"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-headfile"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Posterfile')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-posterfile" class="form-control" size="50" name="row[posterfile]" type="text" value="{$row.posterfile|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-posterfile" class="btn btn-danger faupload" data-input-id="c-posterfile" data-multiple="false" data-preview-id="p-posterfile"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-posterfile" class="btn btn-primary fachoose" data-input-id="c-posterfile" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-posterfile"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-posterfile"></ul>
        </div>
    </div>
    <div class="form-group" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('Examdata')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="examdataList" item="vo"}
            <label for="row[examdata]-{$key}"><input id="row[examdata]-{$key}" name="row[examdata]" type="radio" value="{$key}" {in name="key" value="$row.examdata"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Areadata')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="areadataList" item="vo"}
            <label for="row[areadata]-{$key}"><input id="row[areadata]-{$key}" name="row[areadata]" type="radio" value="{$key}" {in name="key" value="$row.areadata"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group" id="gSubject" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('Rexam_subject_ids')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-rexam_subject_ids" data-source="rexam/subject/index" data-multiple="true" class="form-control selectpage" name="row[rexam_subject_ids]" type="text" value="{$row.rexam_subject_ids|htmlentities}">
        </div>
    </div>
    <div class="form-group" id="gQuestion" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('Rexam_question_ids')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-rexam_question_ids" data-source="rexam/question/index" data-multiple="true" data-field="title" class="form-control selectpage" name="row[rexam_question_ids]" type="text" value="{$row.rexam_question_ids|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Question_count')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-question_count" class="form-control" name="row[question_count]" type="number" value="{$row.question_count|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Limitdata')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="limitdataList" item="vo"}
            <label for="row[limitdata]-{$key}"><input id="row[limitdata]-{$key}" name="row[limitdata]" type="radio" value="{$key}" {in name="key" value="$row.limitdata"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group" id="gLimitOne" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('Limitone')}(秒):</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-limitone" data-rule="required" class="form-control" name="row[limitone]" type="number" value="{$row.limitone|htmlentities}">
        </div>
    </div>
    <div class="form-group" id="gLimitAll" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('Limitall')}(秒):</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-limitall" data-rule="required" class="form-control" name="row[limitall]" type="number" value="{$row.limitall|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Randomdata')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="randomdataList" item="vo"}
            <label for="row[randomdata]-{$key}"><input id="row[randomdata]-{$key}" name="row[randomdata]" type="radio" value="{$key}" {in name="key" value="$row.randomdata"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Pointsdata')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="pointsdataList" item="vo"}
            <label for="row[pointsdata]-{$key}"><input id="row[pointsdata]-{$key}" name="row[pointsdata]" type="radio" value="{$key}" {in name="key" value="$row.pointsdata"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group" id="gPointslimit" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('Pointslimit')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-pointslimit" data-rule="required" class="form-control" name="row[pointslimit]" type="number" value="{$row.pointslimit|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Groupdata')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="groupdataList" item="vo"}
            <label for="row[groupdata]-{$key}"><input id="row[groupdata]-{$key}" name="row[groupdata]" type="radio" value="{$key}" {in name="key" value="$row.groupdata"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group" id="gGroup" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('Rexam_group_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-rexam_group_id" data-source="rexam/group/index" class="form-control selectpage" name="row[rexam_group_id]" type="text" value="{$row.rexam_group_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Binddata')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="binddataList" item="vo"}
            <label for="row[binddata]-{$key}"><input id="row[binddata]-{$key}" name="row[binddata]" type="radio" value="{$key}" {in name="key" value="$row.binddata"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group" id="gBind" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('Rexam_bind_ids')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-rexam_bind_ids" data-source="rexam/bind/index" data-multiple="true" class="form-control selectpage" name="row[rexam_bind_ids]" type="text" value="{$row.rexam_bind_ids|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Anadata')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="anadataList" item="vo"}
                <label for="row[anadata]-{$key}"><input id="row[anadata]-{$key}" name="row[anadata]" type="radio" value="{$key}" {in name="key" value="$row.anadata"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Starttime')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-starttime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[starttime]" type="text" value="{:$row.starttime?datetime($row.starttime):''}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Expiretime')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-expiretime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[expiretime]" type="text" value="{:$row.expiretime?datetime($row.expiretime):''}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50">{$row.content|htmlentities}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
